@extends('layouts.default')

@section('title')
    {{{ $user->name }}} {{ lang('Voted Topics') }}_@parent
@stop

@section('content')

    <div class="users-show row">

        <div class="col-md-3">
            @include('users.partials.basicinfo')
        </div>

        <div class="main-col col-md-9 left-col">

            <ol class="breadcrumb">
                <li><a href="{{ route('users.show', $user->id) }}">个人中心</a></li>
                <li class="active">Ta 参与的翻译</li>
            </ol>


            <div class="panel panel-default">

                <div class="panel-body">

                    @if (count($translates))
                        <ul class="list-group">
                            @foreach($translates as $translate)
                                @if(isset($translate->translateSection->topic))
                                <li class="list-group-item">
                                    <a href={{route('topics.show',['id'=> $translate->translateSection->topic->id])}}>
                                        {{$translate->translateSection->topic->title}}</a>
                                    <span class="pull-right">{{$translate->getHumansTime()}}</span>
                                </li>
                                @endif
                            @endforeach
                        </ul>
                        <div class="pull-right add-padding-vertically"> {!! $translates->render() !!} </div>
                    @else
                        <div class="empty-block">{{ lang('Dont have any translate yet') }}~~</div>
                    @endif

                </div>

            </div>
        </div>
    </div>

@stop
